<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
session_start();
class LoginPageController extends CI_Controller {

	function __construct()
	{
		parent::__construct();
		$this->load->helper('url');
	}

	function index()
	{
		$this->load->view('LoginPageView');
	}
	
	function validate_entry()
	{
		$this->load->model('Login_model');
		if($this->Login_model->check_entry($_POST)){
			$_SESSION['session_id']=$_POST['username'];
			redirect('adminPageController/');
		}else{	
			$this->load->view("ErrorInvalidLoginView");
		}
	}
	
	function logMeOut()
	{
		$this->load->model('Login_model');
		$this->Login_model->logOut();		
		$this->load->view("NoticeLogOutView");
	}
	
}

/* End of file loginPageController.php */
/* Location: ./application/controllers/loginPageController.php */

?>